home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / UCRASM25.ARJ / CTYPES.ASM < prev    next >
Assembly Source File  |  1991-10-12  |  928b  |  56 lines

  1. StdGrp        group    stdlib,stddata
  2. stddata        segment    para public 'sldata'
  3. stddata        ends
  4. ;
  5. stdlib        segment    para public 'slcode'
  6.         assume    cs:stdgrp
  7. ;
  8. ; IsAlNum- Checks al to see if it is alphanumeric.
  9. ;
  10.         public    sl_IsAlNum
  11. sl_IsAlNum    proc    far
  12.         cmp    al, '0'
  13.         jb    notan
  14.         cmp    al, '9'
  15.         jbe    isan
  16.         cmp    al, 'A'
  17.         jb    notan
  18.         cmp    al, 'Z'
  19.         jbe     isan
  20.         cmp    al, 'a'
  21.         jb    notan
  22.         cmp    al, 'z'
  23.         jbe    isan
  24. notan:        cmp    al, 'a'            ;Clears zero flag
  25.         ret
  26. isan:        cmp    al, al            ;Sets zero flag
  27.         ret
  28. sl_IsAlNum    endp
  29. ;
  30. ;
  31. ; IsxDigit- Checks al to see if it is a hex digit.
  32. ;
  33.         public    sl_IsxDigit
  34. sl_IsxDigit    proc    far
  35.         cmp    al, '0'
  36.         jb    notah
  37.         cmp    al, '9'
  38.         jbe    isah
  39.         cmp    al, 'A'
  40.         jb    notah
  41.         cmp    al, 'F'
  42.         jbe     isah
  43.         cmp    al, 'a'
  44.         jb    notah
  45.         cmp    al, 'f'
  46.         jbe    isah
  47. notah:        cmp    al, 'a'            ;Clears zero flag
  48.         ret
  49. isah:        cmp    al, al            ;Sets zero flag
  50.         ret
  51. sl_IsxDigit    endp
  52. ;
  53. ;
  54. stdlib        ends
  55.         end
  56.